<!DOCTYPE html>
<!--suppress ALL-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="b">
    <div class="row" style="margin-top: 5px">
        <!--商品分类列表和推荐商品-->
        <div class="col-md-3">
            <div th:include="common/menuSortAndRecommend::#m"></div>
        </div>
        <!--商品详情-->
        <div class="col-md-9">
            <h2 style="color: red" th:if="${shoppingCartGoodsListSize==0}">你的购物车为空</h2>
            <table class="table table-bordered table-striped table-hover table-borderless"
                   style="margin-top: 4px"
                   th:if="${shoppingCartGoodsListSize>0&&session.currentUser!=null}">
                <thead>
                <tr>
                    <th style="text-align: center">图片</th>
                    <th style="text-align: center">名称</th>
                    <th style="text-align: center">价格</th>
                    <th style="text-align: center">操作</th>
                </tr>
                </thead>
                <tbody>
                <div th:each="goods:${shoppingCartGoodsList}">
                    <tr>
                        <td style="text-align: center"><img
                                th:src="@{'/static/images/articleImage/'+${goods.imageName}+'.jpg'}"
                                style="height: 44px" alt=""></td>
                        <td style="text-align: center"><a th:href="${'/goods/'+goods.id}" class="status-icon hint--top"
                                                          th:aria-label="${goods.name}"
                                                          th:text="${#strings.abbreviate(goods.name,22)}"></a></td>
                        <td style="text-align: center" th:text="${goods.priceNow}"></td>
                        <td style="text-align: center">
                            <a th:href="'javascript:deleteGoodsInShoppingCart('+${goods.id}+')'" style="text-decoration: none">
                                <button type="button" class="btn btn-danger btn-sm status-icon hint--top"
                                        style="margin-left: 2px" aria-label="删除"><i class="fa fa-trash-o"></i></button>
                            </a>
                            <a th:href="'javascript:reserve('+${goods.id}+')'">
                                <button type="button" class="btn btn-info btn-sm status-icon hint--top"
                                        style="margin-left: 2px" aria-label="预订"><i class="fa fa-check-square-o"></i>
                                </button>
                            </a>
                        </td>
                    </tr>
                </div>
                </tbody>
            </table>
        </div>
    </div>
</div>
</body>
</html>